<template>
  <div class="header">
    <div class="header-left">
      <div class="iconfont back-icon">&#xe624;</div>
    </div>
    <div class="header-input">
      <span class="iconfont">&#xe632;</span>
      输入城市/景点/游玩主题
     </div>
    <router-link to="/city">
    <div class="header-right">
      {{this.city}}
      <span class="iconfont arrow-icon">&#xe62a;</span>
    </div>
    </router-link>
  </div>
</template>

<script>
import { mapState } from 'vuex'
export default{
  name: 'HomeHeader',
  props: {
  },
  computed: {
    ...mapState(['city'])
  }
}
</script>
<!-- stylus-loader@3.0.2 不然会报错 -->
<style lang="stylus" scoped>
  @import '~styles/varibles.styl'
  @import '~styles/mixins.styl'
  .header
    color #FFFFFF
    background $bgColor
    display flex
    line-height $headerHeight
    .header-left
        width .64rem
        float left
        .back-icon
          text-align center
          font-size .4rem

    .header-input
        flex 1
        padding-left .2rem
        line-height .64rem
        color #ccc
        margin-top .12rem
        height .64rem
        margin-left .2rem
        background #FFFFFF
        border-radius .1rem
    .header-right
        color white
        min-width 1.04rem
        padding 0 0.1rem
        float right
        text-align center
        .arrow-icon
          font-size .24rem
</style>
